import { APIGET, APIPOST, APIPUT, APIDELETE } from '../bgApiToken';
import { GetParamJoIn } from '@/utils/baseMethods';

/**
 * @exports purtbSelectAll 文件上传接口
 * @param
 * @returns
 */
export const purtbSelectAll = (param, steam) => APIPOST('/purtb/selectAll' + param, steam);

/**
 * @exports purtbSelectAll 文件上传接口
 * @param
 * @returns
 */
export const purtblList = (param) => APIGET('/purma/list', param);

export const cmsmvSalesmanList = (param) => APIGET('/cmsmv/salesmanList', param);

export const apiPurtcAdd = (param) => APIPOST('/purtc/add', param);

export const apiCmsmqGetBuyList = (param) => APIGET('/cmsmq/getBuyList', param);

export const apiUserGetLoginUser = (param) => APIPOST('/user/getLoginUser', param);

export const apiCoptcSelectCoptcList = (param, steam) =>
  APIPOST(`/coptc/selectCoptcList?size=${param.pageSize}&current=${param.current}`, steam);

export const cmsmqGetCustomList = () => APIGET('/cmsmq/getCustomList');

export const coptcSelectTc002 = (param) => APIGET('/coptc/selectTc002', param);

export const copmaList = (param) => APIGET('/copma/listAll', param);

export const coptcAdd = (param) => APIPOST('/coptc/add', param);

export const cmsmeCmsmeVoList = () => APIGET('/cmsme/cmsmeVoList');
export const cmsmvBusinessmanList = () => APIGET('/cmsmv/businessmanList');
export const cmsnaCmsnaVoList = () => APIGET('/cmsna/businessVoList');

export const copmdGetAddressByCustomId = (param) => APIPOST('/copmd/getAddressByCustomId' + param);

export const purtbSelectPurtb = (param) => APIGET('/purtb/selectPurtb', param);

export const purtcList = (param, steam) => APIPOST(`/purtc/list?size=${param.size}&current=${param.current}`, steam);

export const cmsmgLatestExchangeRate = (param) => APIGET('/cmsmg/latestExchangeRate', param);

export const purtcDelPurtc = (param) => APIPOST('/purtc/delPurtc' + param);

export const purtcPurchaseDetail = (param) => APIPOST('/purtc/purchaseDetail' + GetParamJoIn(param));

export const cmsmvPurchaseStaffList = (param) => APIGET('/cmsmv/purchaseStaffList', param);

//获取汇率
export const latestExchangeRate = (param) => APIGET(`/cmsmg/latestExchangeRate?coinType=${param}`);

//根据客户id,获取客户品号
export const getCustomProductIdByCustomId = (param, steam) =>
  APIPOST(`/copmg/getCustomProductIdByCustomId?current=${param.current}&size=${param.size}&customId=${param.customId}`, steam);

/**
 * @exports cmsnaPurchaseVoList
 * @param param
 * @returns
 */
export const cmsnaPurchaseVoList = (param) => APIGET('/cmsna/purchaseVoList', param);

/**
 * @exports coptcSelectCoptd 销售订单详情
 * @param param
 * @returns
 */
export const coptcSelectCoptd = (param) => APIGET('/coptc/selectCoptd', param);
//采购单上报
export const report = (param, userName) => APIPOST(`/purtc/report?userName=${userName}`, param);
